home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / embedded / m68k / fbug68k.arc / FPROUTIN.ESC < prev    next >
Text File  |  1989-08-17  |  19KB  |  725 lines

  1. #include "userdef.h"
  2.  
  3. #define MAXSTR 80
  4. #define SOURCE 0
  5. #define DEST 1
  6.  
  7. /* ********************************************************************* */
  8. /* ROUTINE:assembly{}                             */
  9. /* ********************************************************************* */
  10. assembly(start,str)
  11. int start;
  12. char *str;
  13.  
  14. {
  15. extern int instructnum;
  16. extern predicate;
  17.  
  18. #if(DEVICE==68040)
  19. extern optionSorD;/* intialized in initEAstructures() */
  20. extern EASPEC EA[];
  21.  
  22. int i;
  23. char teststring[MAXLINE];
  24. #endif
  25.  
  26. int size;
  27.  
  28. instructnum=-1;
  29. initEAstructures();
  30. instrmatch(str);        /* should set instructnum */
  31.  
  32. /* ****************************************************** */
  33. /* COPROCESSOR determines the extent of the search      */
  34.  
  35. if(instructnum==-1 && (COPROCESSOR==TRUE || DEVICE==68040))
  36.     {
  37.     instrmatchfp(str);    /* This will check the entire extent of the
  38.                       floating point table for a match.  The
  39.                    extent of this table is determined at
  40.                    compile time based on the COPROCESSOR,
  41.                    EMULATOR and DEVICE defines. */
  42.  
  43.  
  44. /* ********************************************************************    */
  45. /* Check specifically for a match on intstructnum 33 which is not    */
  46. /* allowed for the dyadic instructnums                    */
  47.     if(instructnum==33 &&
  48.         ((predicate >=0x20 && predicate <=0x28) || predicate ==0x38))
  49.             instructnum= -1;    
  50. /*                                    */
  51. /* ********************************************************************    */
  52.  
  53.     if(instructnum!=-1)
  54.         {
  55.         instructnum=instructnum + 200;    
  56.         /* asm/disasm decodings start at 200 + instructnum */
  57.         }
  58.     }
  59.  
  60. #if (DEVICE==68040)
  61. if(instructnum == -1)
  62.     {
  63.     if(str[1]=='s' || str[1]=='S')
  64.         optionSorD='s';
  65.     else if(str[1]=='d' || str[1]=='D')
  66.         optionSorD='d';
  67.     else
  68.         optionSorD=ENDSTR;
  69.  
  70.     if(optionSorD!=ENDSTR)
  71.         {
  72.         for(i=0;str[i]!=ENDSTR;i++)
  73.             teststring[i]=str[i];
  74.         teststring[i]=ENDSTR;
  75.         teststring[1]=teststring[0];
  76.         shiftarg(teststring,1);
  77.         instrmatchfp(teststring);
  78.         if(instructnum!=-1)
  79.             {
  80.             if((instructnum>=15 && instructnum<=23) 
  81.               || (instructnum>=30 && instructnum<=33))
  82.  
  83. /* NOTE: This still leaves the fcmp ==> fscmp or fdcmp options allowable
  84.      and will have to eliminate these possibilities in instrmatchfp */
  85.  
  86.                 instructnum=instructnum + 200;    
  87.             else
  88.                 instructnum = -1;
  89.             /* asm/disasm decodings start at 200 and have 
  90.                conditionals built into them to check the 
  91.                SorDfp variable */ 
  92.             }
  93.         }
  94.     }
  95. #endif
  96. /* ********************************************** */
  97.  
  98.  
  99. if(instructnum!=-1)
  100. {
  101.     size=codeassembly(start,instructnum);
  102.     if(size > 0)
  103.     {
  104.         disasm(start);
  105.         print("\n");
  106.     }
  107.     return(size);
  108. }
  109. return(0);
  110. }
  111. /*  0 = unidentifiable error/no assembly made encountered on assembly     */
  112. /* -1 = illegal flow change                        */
  113. /* assembly end{}                            */
  114.  
  115.  
  116.  
  117.  
  118. #if ((COPROCESSOR==TRUE) || (DEVICE==68040))
  119.  
  120. /* ******************************************************************* */
  121. /* ROUTINE:instrmatchfp{}                           */
  122. /* ******************************************************************* */
  123. instrmatchfp(str)
  124. char *str;
  125. {
  126.  
  127.  
  128. /* MAXCOPROCINST is the entire extent of table here     */
  129. /* predicate should be used here             */
  130.  
  131. extern COPROCSTRUCTURE syntax2[];
  132. extern MONADICDYADIC MONAorDYA[];
  133. #if (DEVICE==68040)
  134. extern optionSorD;
  135. #endif
  136. extern COPROCCONDITIONALS typepredicate[];
  137. extern COPROCCONTROLREG COPROCCRreg[];
  138. extern SIZETYPES sizefield[];
  139. extern EAALLOWED_TYPE EAtype[];
  140. extern int predicate;
  141. extern int instructnum;
  142. extern char sizechar[];
  143. extern error;
  144. /* ******************************** */
  145. /* VARIABLES FOR SOURCE/DESTINATION */
  146. extern EASPEC EA[];
  147. extern int MIPOST;
  148.  
  149. int SorD;
  150. char allowableEA[13];
  151. /* ******************************** */
  152. int maxentry,g,h,i,j,k,l,cr1,cr2;
  153. int int1,int2;
  154. int a,Bmatch,instructmatch;
  155. int bitfieldvar;
  156. char table_syntax[MAXLINE];
  157. char teststring[MAXLINE];
  158. char teststringfc[MAXLINE];
  159. /* ******************************** */
  160.  
  161.  
  162. instructmatch=0;
  163. for (i=0;i<=MAXCOPROCINST;i++)    /* this uses that value to tell how 
  164.                        many entries are in that table */
  165. {
  166.     predicate=-1;
  167.     Bmatch=FALSE;
  168.     for(j=0;(syntax2[i].name[j] == str[j]) && (syntax2[i].name[j] !=ENDSTR);j++)
  169.         ;
  170.     if(i==15)
  171.         predicate=0;
  172.     if(syntax2[i].name[j]=='~') 
  173.         {
  174.         if(i==4 || i==12 || i==3 || i==13 || i==14)
  175.             {
  176.             for(k=0;(k<=31 && predicate==-1);k++)
  177.             {
  178.             if((k==0 || k==15) 
  179.         && ((str[j]==typepredicate[k].condition[0]) 
  180.         || (str[j]==typepredicate[k].condition[0] + 0x20)))
  181.                 {
  182.                 j++;
  183.                 predicate=k;
  184.                 break;
  185.                 }
  186.             else if((k==1 || k==7 || k==8 || k==14 || k==16 || k==18
  187.          || k==19 || k==20 || k==21 || k==22 || k==31)
  188.         && (str[j]==typepredicate[k].condition[0] 
  189.         || str[j]==typepredicate[k].condition[0]+0x20) 
  190.         && (str[j+1]==typepredicate[k].condition[1] 
  191.         || str[j+1]==typepredicate[k].condition[1]+0x20))
  192.                     {
  193.                     j++;
  194.                     j++;
  195.                     predicate=k;
  196.                     break;
  197.                     }
  198.             else if((k==24)
  199.         && (str[j]==typepredicate[k].condition[0] 
  200.         || str[j]==typepredicate[k].condition[0]+0x20) 
  201.         && (str[j+1]==typepredicate[k].condition[1] 
  202.         || str[j+1]==typepredicate[k].condition[1]+0x20) 
  203.         && (str[j+2]==typepredicate[k].condition[2] 
  204.         || str[j+2]==typepredicate[k].condition[2]+0x20) 
  205.         && (str[j+3]==typepredicate[k].condition[3] 
  206.         || str[j+3]==typepredicate[k].condition[3]+0x20))
  207.                     {
  208.                     j++;
  209.                     j++;
  210.                     j++;
  211.                     j++;
  212.                     predicate=k;
  213.                     break;
  214.                     }
  215.             else if(
  216.         (str[j]==typepredicate[k].condition[0] 
  217.         || str[j]==typepredicate[k].condition[0]+0x20) 
  218.         && (str[j+1]==typepredicate[k].condition[1] 
  219.         || str[j+1]==typepredicate[k].condition[1]+0x20) 
  220.         && (str[j+2]==typepredicate[k].condition[2] 
  221.         || str[j+2]==typepredicate[k].condition[2]+0x20))
  222.                     {
  223.                     j++;
  224.                     j++;
  225.                     j++;
  226.                     predicate=k;
  227.                     break;
  228.                     }
  229.             }/* end for */
  230.             /*NOTE: j now points to the '.' position of the syntax*/
  231.             if((str[j]==' ' || str[j]=='\t' || str[j]==ENDSTR) && predicate !=-1)
  232.             {
  233.                 Bmatch=TRUE;
  234.                 sizechar[0]='~';
  235.                 sizechar[1]=ENDSTR;
  236.             }
  237.             else if(str[j]=='.' && instructnum!=13 && str[j+1]!='~' &&                predicate != -1
  238. &&               (str[j+1]== sizefield[syntax2[i].sizestr].size[0] ||
  239.             str[j+1]== sizefield[syntax2[i].sizestr].size[1] ||
  240.             str[j+1]== sizefield[syntax2[i].sizestr].size[2] ||
  241.             str[j+1]== sizefield[syntax2[i].sizestr].size[3] ||
  242.             str[j+1]== sizefield[syntax2[i].sizestr].size[4] ||
  243.             str[j+1]== sizefield[syntax2[i].sizestr].size[5] ||
  244.             str[j+1]== sizefield[syntax2[i].sizestr].size[6]))
  245.             {
  246.                 Bmatch=TRUE;
  247.                 sizechar[0]=str[j+1];
  248.                 sizechar[1]=ENDSTR;
  249.             }
  250.             j=0;/* ie. a point where there will never be a '.' or
  251.                 ENDSTR so that it won't match the next 2 if 
  252.                 statements                */
  253.         }/* end if 4 etc... */
  254.         else if(i>=30 && i<=33)
  255.         {
  256.         for(g=0; g<=MONADICSRCH; g++)
  257.             {
  258.             for(h=0;(MONAorDYA[g].instruction[h] == str[h]) && (MONAorDYA[g].instruction[h] !=ENDSTR);h++)
  259.                 ;
  260.             if(MONAorDYA[g].instruction[h]==ENDSTR && 
  261.                 (str[h]==' ' || str[h]=='\t'))
  262.                 {
  263.                 Bmatch=TRUE;
  264.                 sizechar[0]='~';
  265.                 sizechar[1]=ENDSTR;
  266.                 predicate=MONAorDYA[g].extension;
  267.                 }
  268.             else if(MONAorDYA[g].instruction[h]==ENDSTR && 
  269.                 str[h]=='.' && 
  270.                (str[h+1]== sizefield[syntax2[i].sizestr].size[0]||
  271.             str[h+1]== sizefield[syntax2[i].sizestr].size[1]||
  272.             str[h+1]== sizefield[syntax2[i].sizestr].size[2]||
  273.             str[h+1]== sizefield[syntax2[i].sizestr].size[3]||
  274.             str[h+1]== sizefield[syntax2[i].sizestr].size[4]||
  275.             str[h+1]== sizefield[syntax2[i].sizestr].size[5]||
  276.             str[h+1]== sizefield[syntax2[i].sizestr].size[6]) &&
  277.             (str[h+2]==' ' || str[h+2]=='\t'))
  278.                 {
  279.                 Bmatch=TRUE;
  280.                 sizechar[0]=str[h+1];
  281.                 sizechar[1]=ENDSTR;
  282.                 predicate=MONAorDYA[g].extension;
  283.                 }
  284.             j=0;/* ie. a point where there will never be a '.' or
  285.                 ENDSTR so that it won't match the next 2 if 
  286.                 statements                */
  287.         }/* end for */
  288.         }/* end else MONADIC or DYADIC search */
  289.         }/* end conditional check */
  290.  
  291.     if((syntax2[i].name[j]=='.' || syntax2[i].name[j]==ENDSTR) && 
  292.                (str[j]==' ' || 
  293.                 str[j]=='\t' || 
  294.             str[j]==ENDSTR))
  295.         {
  296.         Bmatch=TRUE;
  297.         sizechar[0]='~';
  298.         sizechar[1]=ENDSTR;
  299.         }
  300.     else if(syntax2[i].name[j]==ENDSTR && syntax2[i].name[j-1]=='.' && 
  301.                (str[j]== sizefield[syntax2[i].sizestr].size[0] ||
  302.             str[j]== sizefield[syntax2[i].sizestr].size[1] ||
  303.             str[j]== sizefield[syntax2[i].sizestr].size[2] ||
  304.             str[j]== sizefield[syntax2[i].sizestr].size[3] ||
  305.             str[j]== sizefield[syntax2[i].sizestr].size[4] ||
  306.             str[j]== sizefield[syntax2[i].sizestr].size[5] ||
  307.             str[j]== sizefield[syntax2[i].sizestr].size[6]))
  308.         {
  309.         Bmatch=TRUE;
  310.         sizechar[0]=str[j];
  311.         sizechar[1]=ENDSTR;
  312.         }
  313.  
  314. #if (DEVICE==68040)
  315. /* ************************************************************************ */
  316. /* This is the check to determine if a single or double precision operation
  317.     match has been made to an instruction that is not allowed */
  318.  
  319.     if(optionSorD != ENDSTR && 
  320.         predicate != 0x18 &&
  321.         predicate != 0x22 &&
  322.         predicate != 0x20 &&
  323.         predicate != 0x00 &&
  324.         predicate != 0x23 &&
  325.         predicate != 0x1a &&
  326.         predicate != 0x04 &&
  327.         predicate != 0x28) 
  328.                 Bmatch=FALSE;
  329. /* ************************************************************************ */
  330.     if(optionSorD != ENDSTR && predicate==0x04)
  331.         predicate = predicate - 0x3;
  332.     if (optionSorD == 's')
  333.         predicate = predicate + 0x40;
  334.     if (optionSorD == 'd')
  335.         predicate = predicate + 0x44;
  336. #endif
  337.  
  338.  
  339.     if(Bmatch==TRUE)
  340.     {
  341.         instructmatch=i;
  342.         for(l=0;str[l]!=ENDSTR;l++)
  343.             {
  344.             teststring[l]=str[l];
  345.             teststringfc[l]=str[l];
  346.             }
  347.         teststring[l]=ENDSTR;
  348.         teststringfc[l]=ENDSTR;
  349.  
  350.  
  351. /* ************************SETUP SOURCE/DEST**************************** */
  352.         l=0;
  353.     for(int1=0;int1<=1;int1++)
  354.     {
  355.         if(int1 == 0)
  356.             int2=syntax2[instructmatch].source;
  357.         else
  358.             int2=syntax2[instructmatch].dest;
  359.  
  360.         if(int1 == 1)
  361.             table_syntax[l++]=',';
  362.  
  363.         if(EAtype[int2].allowableEA > 0xfff)
  364.         {
  365.  
  366.             switch(EAtype[int2].allowableEA >> 12)
  367.             {
  368.                 case 4:/* 'N' for NONE */
  369.                     if(int1==0)
  370.                         table_syntax[l++]='N';
  371.                     break;
  372.                 case 20:/* 'H' for FP RegList */
  373.                     table_syntax[l++]='H';
  374.                     break;
  375.                 case 21:/* 'I' for FPn or FPm register */
  376.                     table_syntax[l++]='I';
  377.                     break;
  378.                 case 22:/* 'J' <ea>{Dn} or <ea>{#k}  */
  379.                     table_syntax[l++]='J';
  380.                     syntaxsetup(&table_syntax[l],0);
  381.                     l=l+12;
  382.                     break;
  383.                 case 23:/* 'K' for a single FP control reg */
  384.                     table_syntax[l++]='K';
  385.                     break;
  386.                 case 24:/* 'L' for FPIAR only */
  387.                     table_syntax[l++]='L';
  388.                     break;
  389.                 case 25:/* FPm:FPn */
  390.                     table_syntax[l++]='P';
  391.                     break;
  392.                 case 26:/* FPcr List */
  393.                     table_syntax[l++]='O';
  394.                     break;
  395.             }
  396.         }
  397.         else
  398.         {
  399.             table_syntax[l++]='E';
  400.             syntaxsetup(&table_syntax[l],int2);
  401.             l=l+12;
  402.         }
  403.         }
  404.         table_syntax[l]=ENDSTR;
  405. /* *****************CONCLUDE SOURCE SETUP/DEST************************** */
  406.  
  407.  
  408. /* sets up both strings so that these may be changed instead of the originals */
  409.  
  410.         while(teststring[0]!=' ' && teststring[0]!='\t' && teststring[0]!=ENDSTR)
  411.         {
  412.             shiftarg(&teststring[0],1);/* remove instr name from front */
  413.             shiftarg(&teststringfc[0],1);/* remove instr name from front */
  414.         }
  415.         if(teststring[0]!=ENDSTR)
  416.             {
  417.             striparg(&teststring[0]);
  418.             striparg(&teststringfc[0]);
  419.             }
  420.         SorD=SOURCE;        /* set to source */
  421.         error=FALSE;
  422.  
  423.     while(table_syntax[0]!=ENDSTR)
  424.         {    
  425.         if(error==TRUE)
  426.             {
  427.             instructnum=-1;
  428.             break;
  429.             }
  430.         error=FALSE;
  431.         if(table_syntax[0]==',')
  432.             {
  433.             shiftarg(table_syntax,1);
  434.             SorD=DEST;
  435.             }
  436.         else if(table_syntax[0]=='N')
  437.             {
  438.             if(teststring[0]==ENDSTR)
  439.                 shiftarg(table_syntax,1);
  440.             else
  441.                 {
  442.                 error=TRUE;    
  443.                 continue;
  444.                 }
  445.             }
  446.         else if(table_syntax[0]=='Z')
  447.             {
  448.             for(l=0;(teststring[l]!=',' || l==MAXSTR);l++)
  449.                 ;
  450.             l++;
  451.             for(j=0;j<=CRENTRIES;j++)
  452.                 {
  453.                 cr1=TRUE;
  454.                 cr2=TRUE;
  455.                 for(k=0;COPROCCRreg[j].reg[k]!=ENDSTR;k++)
  456.                     {
  457.                     if(COPROCCRreg[j].reg[k]!=teststring[k])
  458.                         cr1=FALSE;
  459.                     if(COPROCCRreg[j].reg[k]!=teststring[l+k])
  460.                         cr2=FALSE;
  461.                     }
  462.                 if(cr1==TRUE || cr2==TRUE)
  463.                     break;
  464.                 }
  465.             if(((teststring[0]=='a'||teststring[0]=='A') ||
  466.                 (teststring[0]=='d'||teststring[0]=='D'))
  467.                 && teststring[1]>='0' 
  468.                 && teststring[1]<='7' 
  469.                 && teststring[2]==','
  470.                 && cr2)
  471.                 {
  472.                 EA[SOURCE].immediatedata=((teststring[0] & 0x1)<<15) | (teststring[1]-'0'<<12) | (COPROCCRreg[j].field);
  473.                 EA[SOURCE].Aregnum=1;
  474.                 }
  475.             else if(((teststring[l]=='a'||teststring[l]=='A') ||
  476.                 (teststring[l]=='d'||teststring[l]=='D'))
  477.                 && teststring[l+1]>='0' 
  478.                 && teststring[l+1]<='7' 
  479.                 && teststring[l+2]==ENDSTR
  480.                 && cr1)
  481.                 {
  482.                 EA[SOURCE].immediatedata=((teststring[l] & 0x1)<<15) | (teststring[l+1]-'0'<<12) | (COPROCCRreg[j].field);
  483.                 EA[SOURCE].Aregnum=0;
  484.                 }
  485.             else
  486.                 {
  487.                     error=TRUE;
  488.                     continue;
  489.                 }
  490.             shiftarg(table_syntax,1);
  491.             }
  492.         else if(table_syntax[0]=='H')
  493.             {
  494.             if((teststring[0]=='f' || teststring[0]=='F') &&
  495.             (teststring[1]=='p' || teststring[1]=='P') &&    
  496.                 (teststring[2]>='0' && teststring[2]<='7') &&
  497.                 (teststring[3]=='/' || teststring[3]==',' || teststring[3]==ENDSTR))
  498.             {
  499.                 EA[SorD].immediatedata=EA[SorD].immediatedata | (0x1<<7-(teststring[2]-'0'));    
  500.                 shiftarg(&teststring[0],3);
  501.             }
  502.             else if((teststring[0]=='f' || teststring[0]=='F') &&
  503.                 (teststring[1]=='p' || teststring[1]=='P') &&
  504.                 (teststring[4]=='f' || teststring[4]=='F') &&
  505.                 (teststring[5]=='p' || teststring[5]=='P') &&
  506.                 (teststring[2]>='0' && teststring[2]<='7') &&
  507.                 (teststring[3]=='-') &&
  508.                 (teststring[6]>='0' && teststring[6]<='7') &&
  509.                 (teststring[7]=='/' || teststring[7]==',' || teststring[7]==ENDSTR))
  510.             {
  511.                 for(l=(teststring[2]-'0');l<=(teststring[6]-'0');l++)
  512.                     EA[SorD].immediatedata=EA[SorD].immediatedata | (0x1<<(7-l));    
  513.                 shiftarg(&teststring[0],7);
  514.             }
  515.             else
  516.             {
  517.                 error=TRUE;
  518.                 continue;
  519.             }
  520.             if(teststring[0]==',' || teststring[0]==ENDSTR)
  521.                 {
  522.                 shiftarg(table_syntax,1);        
  523.                 shiftarg(&teststring[0],1);        
  524.                 }
  525.             else
  526.                 {
  527.                 shiftarg(&teststring[0],1);        
  528.                 continue;
  529.                 }
  530.             }
  531.         else if(table_syntax[0]=='I')
  532.             {
  533.             if((teststring[0]=='f' || teststring[0]=='F') &&
  534.                 (teststring[1]=='p' || teststring[1]=='P') &&
  535.                 (teststring[2]>='0' && teststring[2]<='7') &&
  536.                 (teststring[3]==','|| teststring[3]==ENDSTR || teststring[3]=='{'))
  537.                 {
  538.                 EA[SorD].Aregnum= teststring[2]-'0';
  539.                 shiftarg(table_syntax,1);        
  540.                 shiftarg(&teststring[0],4);        
  541.                 }
  542.             else
  543.             {
  544.                 error=TRUE;
  545.                 continue;
  546.             }
  547.             }
  548.         else if(table_syntax[0]=='J')
  549.             {
  550.             for(l=0;l<12;l++)
  551.                 allowableEA[l]=table_syntax[1+l];    
  552.             allowableEA[l]=ENDSTR;    
  553.             shiftarg(table_syntax,13);
  554.             EAallowed(&teststring[0],SorD,allowableEA);        
  555.             if(error)
  556.                 {
  557.                 error=TRUE;
  558.                 continue;
  559.                 }
  560.             if(teststring[0]=='#')
  561.                 {
  562.                 shiftarg(&teststring[0],1);
  563.                 predicate = getnum(&teststring[0],NOERR,DEFAULTSCALE);
  564.                 }
  565.             else if((teststring[0] == 'd' || teststring[0]=='D') &&
  566.                 teststring[1] >= '0' && teststring[1] <= '7')
  567.                 {
  568.                 predicate = (teststring[1] - '0') <<4;
  569.                 shiftarg(&teststring[0],3);
  570.                 }
  571.             else
  572.                 {
  573.                 error=TRUE;
  574.                 continue;
  575.                 }
  576.             }
  577.         else if(table_syntax[0]=='L')
  578.             {
  579.             if((teststring[0]=='f' || teststring[0]=='F') &&
  580.                 (teststring[1]=='p' || teststring[1]=='P') &&
  581.                 (teststring[2]=='i' || teststring[2]=='I') &&
  582.                 (teststring[3]=='a' || teststring[3]=='A') &&
  583.                 (teststring[4]=='r' || teststring[4]=='R') &&
  584.                 (teststring[5]==','|| teststring[5]==ENDSTR || teststring[5]=='{'))
  585.                 {
  586.                 EA[SorD].Aregnum=0x1;    
  587.                 shiftarg(&teststring[0],6);
  588.                 shiftarg(table_syntax,1);
  589.                 }
  590.             else
  591.                 {
  592.                 error=TRUE;
  593.                 continue;
  594.                 }
  595.             }
  596.         else if(table_syntax[0]=='K')
  597.             {
  598.             if((teststring[0]=='f' || teststring[0]=='F') &&
  599.                 (teststring[1]=='p' || teststring[1]=='P') &&
  600.                 (teststring[2]=='c' || teststring[2]=='C') &&
  601.                 (teststring[3]=='r' || teststring[3]=='R') &&
  602.                 (teststring[4]==','|| teststring[4]==ENDSTR || teststring[4]=='{'))
  603.                 {
  604.                 EA[SorD].Aregnum=0x4;    
  605.                 shiftarg(&teststring[0],5);
  606.                 shiftarg(table_syntax,1);
  607.                 }
  608.             else if((teststring[0]=='f' || teststring[0]=='F') &&
  609.                 (teststring[1]=='p' || teststring[1]=='P') &&
  610.                 (teststring[2]=='s' || teststring[2]=='S') &&
  611.                 (teststring[3]=='r' || teststring[3]=='R') &&
  612.                 (teststring[4]==','|| teststring[4]==ENDSTR || teststring[4]=='{'))
  613.                 {
  614.                 EA[SorD].Aregnum=0x2;    
  615.                 shiftarg(&teststring[0],5);
  616.                 shiftarg(table_syntax,1);
  617.                 }
  618.             else if((teststring[0]=='f' || teststring[0]=='F') &&
  619.                 (teststring[1]=='p' || teststring[1]=='P') &&
  620.                 (teststring[2]=='i' || teststring[2]=='I') &&
  621.                 (teststring[3]=='a' || teststring[3]=='A') &&
  622.                 (teststring[4]=='r' || teststring[4]=='R') &&
  623.                 (teststring[5]==','|| teststring[5]==ENDSTR || teststring[5]=='{'))
  624.                 {
  625.                 EA[SorD].Aregnum=0x1;    
  626.                 shiftarg(&teststring[0],6);
  627.                 shiftarg(table_syntax,1);
  628.                 }
  629.             else
  630.                 {
  631.                 error=TRUE;
  632.                 continue;
  633.                 }
  634.             }
  635.         else if(table_syntax[0]=='O')
  636.             {
  637.             if((teststring[0]=='f' || teststring[0]=='F') &&
  638.                 (teststring[1]=='p' || teststring[1]=='P') &&
  639.                 (teststring[2]=='c' || teststring[2]=='C') &&
  640.                 (teststring[3]=='r' || teststring[3]=='R') &&
  641.                 (teststring[4]==','|| teststring[4]==ENDSTR || teststring[4]=='/'))
  642.                 {
  643.                 EA[SorD].Aregnum=EA[SorD].Aregnum | 0x4;    
  644.                 shiftarg(&teststring[0],4);
  645.                 }
  646.             else if((teststring[0]=='f' || teststring[0]=='F') &&
  647.                 (teststring[1]=='p' || teststring[1]=='P') &&
  648.                 (teststring[2]=='s' || teststring[2]=='S') &&
  649.                 (teststring[3]=='r' || teststring[3]=='R') &&
  650.                 (teststring[4]==','|| teststring[4]==ENDSTR || teststring[4]=='/'))
  651.                 {
  652.                 EA[SorD].Aregnum=EA[SorD].Aregnum | 0x2;    
  653.                 shiftarg(&teststring[0],4);
  654.                 }
  655.             else if((teststring[0]=='f' || teststring[0]=='F') &&
  656.                 (teststring[1]=='p' || teststring[1]=='P') &&
  657.                 (teststring[2]=='i' || teststring[2]=='I') &&
  658.                 (teststring[3]=='a' || teststring[3]=='A') &&
  659.                 (teststring[4]=='r' || teststring[4]=='R') &&
  660.                 (teststring[5]==','|| teststring[5]==ENDSTR || teststring[5]=='/'))
  661.                 {
  662.                 EA[SorD].Aregnum=EA[SorD].Aregnum | 0x1;    
  663.                 shiftarg(&teststring[0],5);
  664.                 }
  665.             else
  666.                 {
  667.                 error=TRUE;
  668.                 continue;
  669.                 }
  670.             if(teststring[0]==',' || teststring[0]==ENDSTR)
  671.                 {
  672.                 shiftarg(table_syntax,1);        
  673.                 shiftarg(&teststring[0],1);        
  674.                 }
  675.             else
  676.                 {
  677.                 shiftarg(&teststring[0],1);        
  678.                 continue;
  679.                 }
  680.             }
  681.         else if(table_syntax[0]=='P')
  682.             {
  683.             if((teststring[0]=='f' || teststring[0]=='F') &&
  684.                 (teststring[1]=='p' || teststring[1]=='P') &&
  685.                 (teststring[2]>='0' && teststring[2]<='7') &&
  686.                 (teststring[3]==':') &&
  687.                 (teststring[4]=='f' || teststring[4]=='F') &&
  688.                 (teststring[5]=='p' || teststring[5]=='P') &&
  689.                 (teststring[6]>='0' && teststring[6]<='7') &&
  690.                 (teststring[7]==','|| teststring[7]==ENDSTR || teststring[7]=='{'))
  691.                 {
  692.                 EA[SorD].Aregnum=teststring[6]-'0'<<7 | teststring[2]-'0';    
  693.                 shiftarg(&teststring[0],8);
  694.                 shiftarg(table_syntax,1);
  695.                 }
  696.             else
  697.                 {
  698.                 error=TRUE;
  699.                 continue;
  700.                 }
  701.             }
  702.         else if(table_syntax[0]=='E') 
  703.             {
  704.             for(l=0;l<12;l++)
  705.                 allowableEA[l]=table_syntax[1+l];    
  706.             allowableEA[l]=ENDSTR;    
  707.             shiftarg(table_syntax,13);
  708.             EAallowed(&teststring[0],SorD,allowableEA);        
  709.             }
  710.         if(table_syntax[0]==ENDSTR && !error)
  711.             {
  712.             if(teststring[0] != ENDSTR && teststring[0] != ' ' && 
  713.                 instructmatch == 17)
  714.                 instructnum=-1;/* fmove mismatch on {Dn}/{#k} */
  715.             else
  716.                 instructnum=instructmatch;
  717.             return;
  718.             }
  719.         }/*end while*/
  720.     }            /* end of if Bmatch=1    */
  721. }
  722. }
  723.  
  724. #endif
  725.